"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var rxjs_1 = require("rxjs");
var express = require("express");
function createExpress(port, hostname) {
    if (port === void 0) { port = 3000; }
    if (hostname === void 0) { hostname = '0.0.0.0'; }
    return rxjs_1.Observable.create(function (obser) {
        var app = express();
        var handler = function (req, res) {
            obser.next({
                req: req,
                res: res
            });
        };
        app.get('**', handler);
        app.listen(port, hostname);
    });
}
exports.createExpress = createExpress;
